<template>
  <el-button type="primary" @click="handle">hello</el-button>
</template>

<script lang="ts" setup>
import { getCurrentInstance } from 'vue';

let { proxy } = getCurrentInstance();

const handle = () => {
  proxy.$message('hello');
};
</script>
